home *** CD-ROM | disk | FTP | other *** search
-
-
-
- mmmmssssggggoooopppp((((2222)))) mmmmssssggggoooopppp((((2222))))
-
-
-
- NNNNAAAAMMMMEEEE
- _mmmm_ssss_gggg_oooo_pppp: _mmmm_ssss_gggg_ssss_nnnn_dddd, _mmmm_ssss_gggg_rrrr_cccc_vvvv - message operations
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_iiii_pppp_cccc_...._hhhh_>>>>
- _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_mmmm_ssss_gggg_...._hhhh_>>>>
-
- _iiii_nnnn_tttt _mmmm_ssss_gggg_ssss_nnnn_dddd_((((_iiii_nnnn_tttt _mmmm_ssss_qqqq_iiii_dddd_,,,, _cccc_oooo_nnnn_ssss_tttt _vvvv_oooo_iiii_dddd _****_mmmm_ssss_gggg_pppp_,,,,
- _ssss_iiii_zzzz_eeee______tttt _mmmm_ssss_gggg_ssss_zzzz_,,,, _iiii_nnnn_tttt _mmmm_ssss_gggg_ffff_llll_gggg_))))_;;;;
-
- _iiii_nnnn_tttt _mmmm_ssss_gggg_rrrr_cccc_vvvv_((((_iiii_nnnn_tttt _mmmm_ssss_qqqq_iiii_dddd_,,,, _vvvv_oooo_iiii_dddd _****_mmmm_ssss_gggg_pppp_,,,,
- _ssss_iiii_zzzz_eeee______tttt _mmmm_ssss_gggg_ssss_zzzz_,,,, _llll_oooo_nnnn_gggg _mmmm_ssss_gggg_tttt_yyyy_pppp_,,,, _iiii_nnnn_tttt _mmmm_ssss_gggg_ffff_llll_gggg_))))_;;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _mmmm_ssss_gggg_ssss_nnnn_dddd sends a message to the queue associated with the message queue
- identifier specified by _m_s_q_i_d. _m_s_g_p points to a user defined buffer that
- must contain first a field of type long integer that will specify the
- type of the message, and then a data portion that will hold the text of
- the message. The following is an example of members that might be in a
- user defined buffer.
-
- _llll_oooo_nnnn_gggg _mmmm_tttt_yyyy_pppp_eeee_;;;; _////_**** _mmmm_eeee_ssss_ssss_aaaa_gggg_eeee _tttt_yyyy_pppp_eeee _****_////
- _cccc_hhhh_aaaa_rrrr _mmmm_tttt_eeee_xxxx_tttt_[[[[_]]]]_;;;; _////_**** _mmmm_eeee_ssss_ssss_aaaa_gggg_eeee _tttt_eeee_xxxx_tttt _****_////
-
- _mmmm_tttt_yyyy_pppp_eeee is a positive integer that can be used by the receiving process for
- message selection. _mmmm_tttt_eeee_xxxx_tttt is any text of length _m_s_g_s_z bytes. _m_s_g_s_z can
- range from _0000 to a system imposed maximum.
-
- _m_s_g_f_l_g specifies the action to be taken if one or more of the following
- are true:
-
- The number of bytes already on the queue is equal to _mmmm_ssss_gggg______qqqq_bbbb_yyyy_tttt_eeee_ssss [see
- _iiii_nnnn_tttt_rrrr_oooo(2)].
-
- The total number of messages on all queues system-wide is equal to
- the system-imposed limit.
-
- These actions are as follows:
-
- If (_m_s_g_f_l_g_&&&&_IIII_PPPP_CCCC______NNNN_OOOO_WWWW_AAAA_IIII_TTTT) is true, the message is not sent and the
- calling process returns immediately.
-
- If (_m_s_g_f_l_g_&&&&_IIII_PPPP_CCCC______NNNN_OOOO_WWWW_AAAA_IIII_TTTT) is false, the calling process suspends
- execution until one of the following occurs:
-
- The condition responsible for the suspension no longer
- exists, in which case the message is sent.
-
- _m_s_q_i_d is removed from the system [see _mmmm_ssss_gggg_cccc_tttt_llll(2)]. When this
- occurs, _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_IIII_DDDD_RRRR_MMMM, and a value of -1 is
- returned.
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- mmmmssssggggoooopppp((((2222)))) mmmmssssggggoooopppp((((2222))))
-
-
-
- The calling process receives a signal that is to be caught.
- In this case the message is not sent and the calling process
- resumes execution in the manner prescribed in _ssss_iiii_gggg_nnnn_aaaa_llll(2).
-
- _mmmm_ssss_gggg_ssss_nnnn_dddd fails and sends no message if one or more of the following are
- true:
-
- _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _m_s_q_i_d is not a valid message queue identifier.
-
- _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS Write permission is denied to the calling process [see
- _iiii_nnnn_tttt_rrrr_oooo(2)].
-
- _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _m_t_y_p_e is less than 1.
-
- _EEEE_AAAA_GGGG_AAAA_IIII_NNNN The message cannot be sent for one of the reasons cited
- above and (_m_s_g_f_l_g_&&&&_IIII_PPPP_CCCC______NNNN_OOOO_WWWW_AAAA_IIII_TTTT) is true.
-
- _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _m_s_g_s_z is less than zero or greater than the system-imposed
- limit.
-
- _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT _m_s_g_p points to an illegal address.
-
- Upon successful completion, the following actions are taken with respect
- to the data structure associated with _m_s_q_i_d [see intro (2)].
-
- _mmmm_ssss_gggg______qqqq_nnnn_uuuu_mmmm is incremented by 1.
-
- _mmmm_ssss_gggg______llll_ssss_pppp_iiii_dddd is set to the process ID of the calling process.
-
- _mmmm_ssss_gggg______ssss_tttt_iiii_mmmm_eeee is set to the current time.
-
- _mmmm_ssss_gggg_rrrr_cccc_vvvv reads a message from the queue associated with the message queue
- identifier specified by _m_s_q_i_d and places it in the user defined structure
- pointed to by _m_s_g_p. The structure must contain a message type field
- followed by the area for the message text (see the structure _mmmm_yyyy_mmmm_ssss_gggg
- above). _mmmm_tttt_yyyy_pppp_eeee is the received message's type as specified by the sending
- process. _mmmm_tttt_eeee_xxxx_tttt is the text of the message. _m_s_g_s_z specifies the size in
- bytes of mtext. The received message is truncated to _m_s_g_s_z bytes if it
- is larger than _m_s_g_s_z and (_m_s_g_f_l_g_&&&&_MMMM_SSSS_GGGG______NNNN_OOOO_EEEE_RRRR_RRRR_OOOO_RRRR) is true. The truncated
- part of the message is lost and no indication of the truncation is given
- to the calling process.
-
- _m_s_g_t_y_p specifies the type of message requested as follows:
-
- If _m_s_g_t_y_p is 0, the first message on the queue is received.
-
- If _m_s_g_t_y_p is greater than 0, the first message of type _m_s_g_t_y_p is
- received.
-
- If _m_s_g_t_y_p is less than 0, the first message of the lowest type that
- is less than or equal to the absolute value of _m_s_g_t_y_p is received.
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- mmmmssssggggoooopppp((((2222)))) mmmmssssggggoooopppp((((2222))))
-
-
-
- _m_s_g_f_l_g specifies the action to be taken if a message of the desired type
- is not on the queue. These are as follows:
-
- If (_m_s_g_f_l_g_&&&&_IIII_PPPP_CCCC______NNNN_OOOO_WWWW_AAAA_IIII_TTTT) is true, the calling process returns
- immediately with a return value of -1 and sets _eeee_rrrr_rrrr_nnnn_oooo to _EEEE_NNNN_OOOO_MMMM_SSSS_GGGG.
-
- If (_m_s_g_f_l_g_&&&&_IIII_PPPP_CCCC______NNNN_OOOO_WWWW_AAAA_IIII_TTTT) is false, the calling process suspends
- execution until one of the following occurs:
-
- A message of the desired type is placed on the queue.
-
- _m_s_q_i_d is removed from the system. When this occurs, _eeee_rrrr_rrrr_nnnn_oooo
- is set to _EEEE_IIII_DDDD_RRRR_MMMM, and a value of -1 is returned.
-
- The calling process receives a signal that is to be caught.
- In this case a message is not received and the calling
- process resumes execution in the manner prescribed in
- _ssss_iiii_gggg_nnnn_aaaa_llll(2).
-
- _mmmm_ssss_gggg_rrrr_cccc_vvvv fails and receives no message if one or more of the following are
- true:
-
- _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _m_s_q_i_d is not a valid message queue identifier.
-
- _EEEE_AAAA_CCCC_CCCC_EEEE_SSSS Read permission is denied to the calling process.
-
- _EEEE_IIII_NNNN_VVVV_AAAA_LLLL _m_s_g_s_z is less than 0.
-
- _EEEE_2222_BBBB_IIII_GGGG The length of _m_t_e_x_t is greater than _m_s_g_s_z and
- (_m_s_g_f_l_g_&&&&_MMMM_SSSS_GGGG______NNNN_OOOO_EEEE_RRRR_RRRR_OOOO_RRRR) is false.
-
- _EEEE_NNNN_OOOO_MMMM_SSSS_GGGG The queue does not contain a message of the desired type
- and (_m_s_g_t_y_p_&&&&_IIII_PPPP_CCCC______NNNN_OOOO_WWWW_AAAA_IIII_TTTT) is true.
-
- _EEEE_FFFF_AAAA_UUUU_LLLL_TTTT _m_s_g_p points to an illegal address.
-
- Upon successful completion, the following actions are taken with respect
- to the data structure associated with _m_s_q_i_d [see intro (2)].
-
- _mmmm_ssss_gggg______qqqq_nnnn_uuuu_mmmm is decremented by 1.
-
- _mmmm_ssss_gggg______llll_rrrr_pppp_iiii_dddd is set to the process ID of the calling process.
-
- _mmmm_ssss_gggg______rrrr_tttt_iiii_mmmm_eeee is set to the current time.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- _iiii_nnnn_tttt_rrrr_oooo(2), _mmmm_ssss_gggg_cccc_tttt_llll(2), _mmmm_ssss_gggg_gggg_eeee_tttt(2), _ssss_iiii_gggg_nnnn_aaaa_llll(2).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- If _mmmm_ssss_gggg_ssss_nnnn_dddd or _mmmm_ssss_gggg_rrrr_cccc_vvvv return due to the receipt of a signal, a value of -1
- is returned to the calling process and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_IIII_NNNN_TTTT_RRRR. If they
- return due to removal of _m_s_q_i_d from the system, a value of -1 is returned
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- mmmmssssggggoooopppp((((2222)))) mmmmssssggggoooopppp((((2222))))
-
-
-
- and _eeee_rrrr_rrrr_nnnn_oooo is set to _EEEE_IIII_DDDD_RRRR_MMMM.
-
- Upon successful completion, the return value is as follows:
-
- _mmmm_ssss_gggg_ssss_nnnn_dddd returns a value of 0.
-
- _mmmm_ssss_gggg_rrrr_cccc_vvvv returns the number of bytes actually placed into _m_t_e_x_t.
-
- Otherwise, a value of -1 is returned and _eeee_rrrr_rrrr_nnnn_oooo is set to indicate the
- error.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-